import React, { Component } from 'react'
import { Route, Routes } from 'react-router-dom'

import ProductHome from './home'
import ProductAddUpdate from './add-update'
import ProductDetail from './detail'



export default class Product extends Component {
  render() {
    return (
      // 也可以用Outlet 嵌套路由显示位置
      <Routes>
        <Route path='' element={<ProductHome />}></Route>
        <Route path='addupdate' element={<ProductAddUpdate />}></Route>
        <Route path='detail' element={<ProductDetail />}></Route>
      </Routes>
    )
  }
}
